package com.example.demo.entity.relation;

import javax.persistence.*;
import java.util.Date;

@Entity
@Table(name = "tb_consult_record", indexes = {
        @Index(columnList = "user_id"),
        @Index(columnList = "consultant_id"),
        @Index(columnList = "user_id, consultant_id")
})
public class ConsultRecord {
    @Id
    @Column(name = "id", updatable = false, nullable = false)
    private String id;

    @Column(name = "user_id", nullable = false)
    private String userId;

    @Column(name = "consultant_id", nullable = false)
    private String consultantId;

    @Column(name = "user_name", length = 64)
    private String userName;

    @Column(name = "consultant_name", length = 64)
    private String consultantName;

    @Column(name = "duration", nullable = false)
    private String duration;

    @Column(name = "time", updatable = false)
    private String time;

    @Column(name = "had_evaluated", nullable = false)
    private String hadEvaluated;

    @Column(name = "evaluate_score")
    private String evaluateScore;

    @Column(name = "evaluate_text", length = 1024)
    private String evaluateText;

    @Column(name = "supervisor_id")
    private String supervisorId;

    @Column(name = "chat_content", length = 2048)
    private String chatContent;

    @Column(name = "consult_type", length = 20)
    private String consultType;

    @Column(name = "consult_describe", length = 256)
    private String consultDescribe;

    public ConsultRecord() {
    }

    public ConsultRecord(String id, String userId, String consultantId, String userName, String consultantName, String duration, String time, String hadEvaluated, String evaluateScore, String evaluateText, String supervisorId, String chatContent, String consultType, String consultDescribe) {
        this.id = id;
        this.userId = userId;
        this.consultantId = consultantId;
        this.userName = userName;
        this.consultantName = consultantName;
        this.duration = duration;
        this.time = time;
        this.hadEvaluated = hadEvaluated;
        this.evaluateScore = evaluateScore;
        this.evaluateText = evaluateText;
        this.supervisorId = supervisorId;
        this.chatContent = chatContent;
        this.consultType = consultType;
        this.consultDescribe = consultDescribe;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getConsultantName() {
        return consultantName;
    }

    public void setConsultantName(String consultantName) {
        this.consultantName = consultantName;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getConsultantId() {
        return consultantId;
    }

    public void setConsultantId(String consultantId) {
        this.consultantId = consultantId;
    }

    public String getDuration() {
        return duration;
    }

    public void setDuration(String duration) {
        this.duration = duration;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getHadEvaluated() {
        return hadEvaluated;
    }

    public void setHadEvaluated(String hadEvaluated) {
        this.hadEvaluated = hadEvaluated;
    }

    public String getEvaluateScore() {
        return evaluateScore;
    }

    public void setEvaluateScore(String evaluateScore) {
        this.evaluateScore = evaluateScore;
    }

    public String getEvaluateText() {
        return evaluateText;
    }

    public void setEvaluateText(String evaluateText) {
        this.evaluateText = evaluateText;
    }

    public String getSupervisorId() {
        return supervisorId;
    }

    public void setSupervisorId(String supervisorId) {
        this.supervisorId = supervisorId;
    }

    public String getChatContent() {
        return chatContent;
    }

    public void setChatContent(String chatContent) {
        this.chatContent = chatContent;
    }

    public String getConsultType() {
        return consultType;
    }

    public void setConsultType(String consultType) {
        this.consultType = consultType;
    }

    public String getConsultDescribe() {
        return consultDescribe;
    }

    public void setConsultDescribe(String consultDescribe) {
        this.consultDescribe = consultDescribe;
    }

    @Override
    public String toString() {
        return "ConsultRecord{" +
                "id='" + id + '\'' +
                ", userId='" + userId + '\'' +
                ", consultantId='" + consultantId + '\'' +
                ", userName='" + userName + '\'' +
                ", consultantName='" + consultantName + '\'' +
                ", duration='" + duration + '\'' +
                ", time='" + time + '\'' +
                ", hadEvaluated='" + hadEvaluated + '\'' +
                ", evaluateScore='" + evaluateScore + '\'' +
                ", evaluateText='" + evaluateText + '\'' +
                ", supervisorId='" + supervisorId + '\'' +
                ", chatContent='" + chatContent + '\'' +
                ", consultType='" + consultType + '\'' +
                ", consultDescribe='" + consultDescribe + '\'' +
                '}';
    }
}
